@font-face {
  font-family: 'Mplus1p';
  font-style: normal;
  font-weight: normal;
  src: url('./onigiri/Mplus1p-Light.ttf') format('woff');
}

@font-face {
  font-family: 'Mplus1p Bold';
  font-style: normal;
  font-weight: bold;
  src: url('./onigiri/Mplus1p-Regular.ttf') format('woff');
}

:root {
  --bg-color:  #363B40;
  --side-bar-bg-color: #2E3033;
  --text-color: #b8bfc6;

  --select-text-bg-color:#4a89dc;

  --item-hover-bg-color: #0a0d16;
  --control-text-color: #b7b7b7;
  --control-text-hover-color: #eee;

  --active-file-bg-color: rgb(34, 34, 34);
  --active-file-border-color: #8d8df0;

  --primary-color: #a3d5fe;

  --active-file-text-color: white;
  --item-hover-bg-color: #70717d;
  --item-hover-text-color: white;
  --primary-color: #6dc1e7;

  --rawblock-edit-panel-bd: #333;
}

.mac-seamless-mode #typora-sidebar {
  top: 20px;
  padding-top: 0;
  height: auto;
}

html,
body,
#write {
  background: #363b40;
  background: var(--bg-color);
  font-family: 'Mplus1p', sans-serif;
  font-weight: 300;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #dedede;
  font-family: 'Mplus1p Bold', sans-serif;
}

html {
  font-size: 16px;
}

#write {
  max-width: 1024px;
  text-align: justify;
}

#write>h1:first-child {
  margin-top: 2.75rem;
}

#write>h2:first-child {
  margin-top: 1.75rem;
}

#write>h3:first-child {
  margin-top: 1rem;
}

#write>h4:first-child {
  margin-top: 0.5rem;
}

h1 {
  font-weight: normal;
  line-height: 4rem;
  font-size: 3rem;
  margin: 0 0 1.75rem;
}

h2 {
  font-weight: normal;
  line-height: 3rem;
  margin: 0 0 1.9375rem;
}

h3 {
  font-weight: normal;
}

h4 {
  font-weight: normal;
}

h5 {
  font-size: 1.125rem;
  font-weight: normal;
}

h6 {
  font-size: 1rem;
  font-weight: bold;
}

p {
  color: #b8bfc6;
  font-size: 1rem;
  line-height: 1.75rem;
  margin: 0 0 1.25rem;
}

#write>h3.md-focus:before {
  left: -1.875rem;
  top: 0.5rem;
  padding: 2px;
}

#write>h4.md-focus:before {
  left: -1.875rem;
  top: 0.3125rem;
  padding: 2px;
}

#write>h5.md-focus:before {
  left: -1.875rem;
  top: 0.25rem;
  padding: 2px;
}

#write>h6.md-focus:before {
  left: -1.875rem;
  top: .125rem;
  padding: 2px;
}

@media screen and (max-width: 48em) {
  blockquote {
    margin-left: 1rem;
    margin-right: 0;
    padding: 0.5em;
  }

  .h1,
  h1 {
    font-size: 2.827rem;
  }

  .h2,
  h2 {
    font-size: 1.999rem;
  }

  .h3,
  h3 {
    font-size: 1.413rem;
  }

  .h4,
  h4 {
    font-size: 1.250rem;
  }

  .h5,
  h5 {
    font-size: 1.150rem;
  }

  .h6,
  h6 {
    font-size: 1rem;
  }
}

a,
.md-def-url {
  color: #990000;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:link {
  color: #00ffff;
}

table {
  margin-bottom: 20px
}

table th,
table td {
  padding: 8px;
  line-height: 1.25rem;
  vertical-align: top;
  border-top: 1px solid #ddd
}

table th {
  font-weight: bold
}

table thead th {
  vertical-align: bottom
}

table caption+thead tr:first-child th,
table caption+thead tr:first-child td,
table colgroup+thead tr:first-child th,
table colgroup+thead tr:first-child td,
table thead:first-child tr:first-child th,
table thead:first-child tr:first-child td {
  border-top: 0
}

table tbody+tbody {
  border-top: 2px solid #ddd
}

.md-fences {
  border: 1px solid #ccc;
  padding: .5em;
  font-size: 0.9em;
  margin-left: 0.2em;
  margin-right: 0.2em;
}

.md-fences {
  margin: 0 0 20px;
  font-size: 1em;
  padding: 0.3em 1em;
  padding-top: 0.4em;
}

.task-list {
  padding-left: 0;
}

.task-list-item {
  padding-left: 2.125rem;
}

.task-list-item input {
  top: 3px;
}

.md-task-list-item input {
  margin-left: -1.5em;
}

/* Chrome 29+ */
@media screen and (-webkit-min-device-pixel-ratio:0) and (min-resolution:.001dpcm) {
  .task-list-item input:before {
    margin-top: -0.2rem;
  }

  .task-list-item input:checked:before,
  .task-list-item input[checked]:before {
    margin-top: -0.2rem;
  }
}

blockquote {
  margin: 0 0 1.11111rem;
  padding: 0.5rem 1.11111rem 0 1.05556rem;
  border-left: 1px solid gray;
}

blockquote,
blockquote p {
  line-height: 1.6;
  color: #8f6f6f;
}

#write pre.md-meta-block {
  min-height: 30px;
  background: #f8f8f8;
  padding: 1.5em;
  font-weight: 300;
  font-size: 1em;
  padding-bottom: 1.5em;
  padding-top: 3em;
  margin-top: -1.5em;
  color: #999;

  width: 100vw;
  max-width: calc(100% + 60px);
  margin-left: -30px;
  border-left: 30px #f8f8f8 solid;
  border-right: 30px #f8f8f8 solid;
}

.MathJax_Display {
  font-size: 0.9em;
  margin-top: 0.5em;
  margin-bottom: 0;
}

p.mathjax-block,
.mathjax-block {
  padding-bottom: 0;
}

.mathjax-block>.code-tooltip {
  bottom: 5px;
  box-shadow: none;
}

.md-image>.md-meta {
  padding-left: 0.5em;
  padding-right: 0.5em;
}

.md-image>img {
  margin-top: 2px;
}

.md-image>.md-meta:first-of-type:before {
  padding-left: 4px;
}

#typora-source {
  color: #555;
}

/** ui for windows **/
#md-searchpanel {
  border-bottom: 1px solid #ccc;
}

#md-searchpanel .btn {
  border: 1px solid #ccc;
}

#md-notification:before {
  top: 14px;
}

#md-notification {
  background: #eee;
}

.md-mathjax-midline {
  background-color: #57616b;
  border-bottom: none;
}

footer.ty-footer {
  border-color: #656565;
}

.ty-preferences .btn-default {
  background: transparent;
}
.ty-preferences .btn-default:hover {
  background: #57616b;
}

.ty-preferences select {
  border: 1px solid #989698;
  height: 21px;
}

.ty-preferences .nav-group-item.active {
  background: var(--item-hover-bg-color);
}

.ty-preferences input[type="search"] {
  border-color: #333;
  background: #333;
  line-height: 22px;
  border-radius: 6px;
  color: white;
}

.ty-preferences input[type="search"]:focus {
  box-shadow: none;
}

.megamenu-menu-panel .btn {
  border: 1px solid #ccc;
}

#typora-sidebar {
  box-shadow: none;
}

.file-list-item,
.show-folder-name .file-list-item {
  padding-top: 20px;
  padding-bottom: 20px;
  line-height: 20px;
}

.file-list-item-summary {
  height: 40px;
  line-height: 20px;
}

.ty-table-edit {
  background: #ededed;
}

.dropdown-menu .divider {
  border-color: #e5e5e5;
}

pre,
code,
kbd,
tt,
var {
  font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
}

/** Syntax highlight */

.cm-s-inner .cm-variable,
.cm-s-inner .cm-operator,
.cm-s-inner .cm-property {
  color: #b8bfc6;
}

.cm-s-inner .cm-keyword {
  color: #C88FD0;
}

.cm-s-inner .cm-tag {
  color: #7DF46A;
}

.cm-s-inner .cm-attribute {
  color: #7575E4;
}

.CodeMirror div.CodeMirror-cursor {
  border-left: 1px solid #b8bfc6;
  z-index: 3;
}

.cm-s-inner .cm-string {
  color: #D26B6B;
}

.cm-s-inner .cm-comment,
.cm-s-inner.cm-comment {
  color: #DA924A;
}

.cm-s-inner .cm-header,
.cm-s-inner .cm-def,
.cm-s-inner.cm-header,
.cm-s-inner.cm-def {
  color: #8d8df0;
}

.cm-s-inner .cm-quote,
.cm-s-inner.cm-quote {
  color: #57ac57;
}

.cm-s-inner .cm-hr {
  color: #d8d5d5;
}

.cm-s-inner .cm-link {
  color: #d3d3ef;
}

.cm-s-inner .cm-negative {
  color: #d95050;
}

.cm-s-inner .cm-positive {
  color: #50e650;
}

.cm-s-inner .cm-string-2 {
  color: #f50;
}

.cm-s-inner .cm-meta,
.cm-s-inner .cm-qualifier {
  color: #b7b3b3;
}

.cm-s-inner .cm-builtin {
  color: #f3b3f8;
}

.cm-s-inner .cm-bracket {
  color: #997;
}

.cm-s-inner .cm-atom,
.cm-s-inner.cm-atom {
  color: #84B6CB;
}

.cm-s-inner .cm-number {
  color: #64AB8F;
}

.cm-s-inner .cm-variable {
  color: #b8bfc6;
}

.cm-s-inner .cm-variable-2 {
  color: #9FBAD5;
}

.cm-s-inner .cm-variable-3 {
  color: #1cc685;
}

.CodeMirror-selectedtext,
.CodeMirror-selected {
  background: #4a89dc;
  color: #fff !important;
  text-shadow: none;
}

.CodeMirror-gutters {
  border-right: none;
}